﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ShanNiang.Service.Attributes
{
    /// <summary>
    /// 菜单和控件关联
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class MenuControlAttribute : Attribute
    {
        /// <summary>
        /// 关联菜单码特性
        /// </summary>
        /// <param name="menuCode">菜单码</param>
        /// <param name="name">菜单名称</param>
        /// <param name="sort">菜单排序</param>
        /// <param name="iconChar">icon字符</param>
        public MenuControlAttribute(string menuCode, string name, int sort, char iconChar)
        {
            MenuCode = menuCode;
            Name = name;
            Sort = sort;
            IconChar = iconChar;
        }
        /// <summary>
        /// 菜单码
        /// </summary>
        public string MenuCode { get; private set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; private set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; private set; }
        /// <summary>
        /// 
        /// </summary>
        public char IconChar { get; private set; }
    }
}
